#include "SkinUtily.h"


CSkinUtily::CSkinUtily()
{

}

CSkinUtily::~CSkinUtily()
{

}

BOOL CSkinUtily::String2Percent( CString lpStr, int* iPercent )
{
    BOOL bRet = FALSE;

    if ( !lpStr.IsEmpty() )
    {
        int prefix = _T( '%' );

        if ( -1 != lpStr.ReverseFind( prefix ) )
        {
            CString sPercent = lpStr.Left( lpStr.ReverseFind( prefix ) );
            *iPercent = _ttoi( sPercent );
            return TRUE;
        }
    }

    return FALSE;
}